package com.zhao.system.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhao.system.poro.Book;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhao.system.vo.Booksvo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xiaozhao
 * @since 2020-11-08
 */
public interface BookMapper extends BaseMapper<Book> {
    //根据用户名查询所有信息
    IPage<Book> getBookPage(Page<Book> page,@Param(Constants.WRAPPER)QueryWrapper<Book> wrapper);
    //查询所有图护士信息
    IPage<Book> getBooks(Page<Book> page,@Param(Constants.WRAPPER)QueryWrapper<Book> wrapper);
    //进行逻辑删除
    int del(Integer bid);
    //根据图书id查询图书信息
    Book findByBid(Integer bid);
    //更新图书的数量
    void updateNum(@Param("bid")Integer bid,@Param("num")Integer num);
}
